package DuoTai;

/**
 * Created by asd73 on 2017/8/26.
 */
class Father {
    public Father() {
        System.out.println("Constructor");
    }

    public void Father(){
        System.out.println("factory");
    }
    public void fun1(){
        System.out.println("father1.fun1");
    }

    public void fun2(){
        System.out.println("father1.fun2");
    }
}

class Son extends Father {
    @Override
    public void fun1() {
        System.out.println("son.fun1");
    }

    @Override
    public void fun2() {
        System.out.println("son.fun2");
    }
}
public class test1 {
    public static void main(String[] args) {
        Father f1 = new Son();
        f1.fun1();
    }
}
